package com.itany.cms.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_comment")
public class Comment {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String context;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createDate;
    @TableField(exist = false)
    private LocalDateTime startDate;
    @TableField(exist = false)
    private LocalDateTime endDate;
    private Integer userId;
    private Integer resourceId;
    private Integer status;
    @TableField(exist = false)
    private String userName;

    public Comment(String context, LocalDateTime createDate, Integer userId, Integer status) {
        this.context = context;
        this.createDate = createDate;
        this.userId = userId;
        this.status = status;
    }
}
